$(function(){
	
	var loadFiles = [
	     			getRootPath() + "/framework/ref.jquery.plugin/poshytip/jquery.poshytip.min.js",
	     			getRootPath() + "/framework/desktopMgr/desktopPanel/panel.js",
					getRootPath() + "/framework/desktopMgr/toolbar/toolbar.js",
					getRootPath() + "/framework/desktopMgr/desktopIcon/icon.js",
					getRootPath() + "/framework/desktopMgr/menu/menu.js",
					getRootPath() + "/framework/desktopMgr/appicon/appicon.js",
					getRootPath() + "/framework/js/setup.js"]; 
	
	$.each(loadFiles,function(index,filePath){
		var fileref=document.createElement('script');   //创建标签 
		fileref.setAttribute("type","text/javascript");//定义属性type的值为text/javascript
		fileref.setAttribute("charset","utf-8");
		fileref.setAttribute("src", filePath);//文件的地址 
		if (typeof fileref!="undefined") {
	      document.getElementsByTagName("body")[0].appendChild(fileref);
		}
	
	});	
	
	$("#load").remove();
	
});




function getRootPath(){
 var strFullPath=window.document.location.href;
 var strPath=window.document.location.pathname;
 var pos=strFullPath.indexOf(strPath);
 var prePath=strFullPath.substring(0,pos);
 var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1);
 return(prePath+postPath);
}



